package net.sky.oa.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * 短信回复
 * SmsRecieve. @author hond
 */
@Entity
@Table(name = "SMS_RECIEVE")//短信回复
public class SmsRecieve implements java.io.Serializable {

	private static final long serialVersionUID = 5673991033245515351L;
	
	// Fields

	protected Long id;
	private String replier;  //回复者姓名
	private String content;  //回复内容
	private Date replytime;  //回复时间
	private String mobile;   //回复手机号
	private String account;  //用户短信账号
	private String port;     //端口号
	private Date recievetime;//查收时间
	private Integer status;     //状态
	private SysEmployee user;  //用户id

	// Constructors

	/** default constructor */
	public SmsRecieve() {
	}
	
	@Id
    @Column(name = "ID", unique = true, nullable = false)
	@SequenceGenerator(name="SQ_SMSRECIEVE_ID",sequenceName="SQ_SMSRECIEVE_ID",allocationSize=1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="SQ_SMSRECIEVE_ID")
	public Long getId() {
        return id;
    }

    public void setId(Long id){
    	this.id = id;
    }

	/** minimal constructor */
	public SmsRecieve(Long id) {
		this.id = id;
	}
	
	@Column(name = "REPLIER", length = 10)
	public String getReplier() {
		return this.replier;
	}

	public void setReplier(String replier) {
		this.replier = replier;
	}

	@Column(name = "CONTENT", length = 700)
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "REPLYTIME", length = 7)
	public Date getReplytime() {
		return this.replytime;
	}

	public void setReplytime(Date replytime) {
		this.replytime = replytime;
	}

	@Column(name = "MOBILE", length = 15)
	public String getMobile() {
		return this.mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	@Column(name = "ACCOUNT", length = 20)
	public String getAccount() {
		return this.account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	@Column(name = "PORT", length = 25)
	public String getPort() {
		return this.port;
	}

	public void setPort(String port) {
		this.port = port;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "RECIEVETIME", length = 7)
	public Date getRecievetime() {
		return this.recievetime;
	}

	public void setRecievetime(Date recievetime) {
		this.recievetime = recievetime;
	}

	@Column(name = "STATUS", precision = 2, scale = 0)
	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "USER_ID")
	public SysEmployee getUser() {
		return this.user;
	}

	public void setUser(SysEmployee user) {
		this.user = user;
	}

}